package com.qingke.notlonely.bean;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;
@Entity
@Table(name="interest")
public class Interest {
	@Id
	@Column(name="id")
	private int id;
	
	@Column(name="hobby")
	private String hobby;
	
	@OneToMany(mappedBy="interest",fetch=FetchType.LAZY)
	private Set<UserInterest> userInterests;
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getHobby() {
		return hobby;
	}
	public void setHobby(String hobby) {
		this.hobby = hobby;
	}
	public Set<UserInterest> getUserInterests() {
		return userInterests;
	}
	public void setUserInterests(Set<UserInterest> userInterests) {
		this.userInterests = userInterests;
	}
	@Override
	public String toString() {
		return "Interest [hobby=" + hobby + "]";
	}
	
}
